{if $added}
<div style="padding:10px;font-size:10pt;font-weight:bold;">
{language text='Mod_Account.added.field'}
</div>
{/if}
<form action="{url link='admin.main.custom-fields-add'}" method="post">
{literal}
<script type="text/javascript">

function loadExtras()
{
	var sType = document.getElementById('type').value;

	if ( sType == "none" )
	{
		document.getElementById('main_form').style.display='none';
	}
	else
	{
		if ( sType == "1" )
		{
			document.getElementById('hide_text').style.display='';
			document.getElementById('hide_drop').style.display='none';
		}
		else
		{
			document.getElementById('hide_drop').style.display='';
			document.getElementById('hide_text').style.display='none';
		}

		document.getElementById('main_form').style.display='';
	}

	return true;
}

</script>
{/literal}

<table cellspacing="0" width="100%" class="forumline">
<tr>
	<td class="row-header" colspan="4"><span>{language text="add_new_field"}</span></td>
</tr>
<tr>
    <td style="font-size:10pt;" class="row1">
    {language text="Mod_Admin.select.field"}:
    <select name="type" style="width:120px;" onchange="return loadExtras();" id="type">
            <option value="none">{language text="Mod_Admin.select"}</option>
            <option value="">{language text="Mod_Admin.drop.down"}</option>
            <option value="1">{language text="Mod_Admin.textarea"}</option>
    </select>
    </td>
</tr>
</table>
<div id="main_form" style="display:none;">
<table cellspacing="0" width="100%" class="forumline">
<tr>
	<td class="row-header" colspan="4"><span>{language text="add_new_field"}</span></td>
</tr>
<tr>
    <td style="font-size:10pt;" class="row1">
    <table style="font-size:10pt;">
    <tr>
    	<td style="text-align:right;font-size:10pt;">{language text="position"}:</td>
    	<td><input type="text" name="pos" style="width:25px;" value="" /></td>
    </tr>
    <tr>
    	<td style="text-align:right;font-size:10pt;">{language text="title"}:</td>
    	<td><input type="text" name="title" size="30" value="" /></td>
    </tr>
    <tr>
    	<td style="text-align:right;font-size:10pt;">{language text="Mod_Admin.on.signup"}:</td>
    	<td>
			<select name="signup">
            	<option value="">{language text="Mod_Admin.no"}</option>
            	<option value="1">{language text="Mod_Admin.yes"}</option>
            </select>
    	</td>
    </tr>

    <tr style="display:none;" id="hide_drop">
    	<td style="text-align:right;font-size:10pt;">{language text="option"} ({language text="default"}):</td>
    	<td> <input type="text" name="option" value="" /></td>
    </tr>

    <tr style="display:none;" id="hide_text">
    	<td style="text-align:right;font-size:10pt;">{language text="Mod_Admin.profile.location"}:</td>
    	<td>
            <select name="panel">
            	<option value="">{language text="Mod_Admin.left}</option>
            	<option value="1">{language text="Mod_Admin.right}</option>
            </select>
    	</td>
    </tr>

   	</table>
	</td>
</tr>
<tr>
	<td colspan="3" style="padding: 5px;"><input type="submit" name="act[add]" value="{language text="add"}" /></td>
</tr>
</table>
</div>
</form>